package com.persagy.energy.app

import com.persagy.energy.app.File2FileApp.filePath

import java.io.File
import scala.io.BufferedSource


object DicToFile {
  val filePath: String = "/Users/king/Downloads/fjd数据/fjd_0_near_1d_2016"
//  val filePath: String = "/Users/king/Downloads/HbaseCat-2.2.1/fjd_0_near_1d_2016.json"
  val outPath: String = "/Users/king/Downloads/fjd_0_near_1d_2016.txt"

  def main(args: Array[String]): Unit = {
    /** 从文件读取数据，逐条发送 */
//    val bufferedSource: BufferedSource = scala.io.Source.fromFile(filePath)
    val file = new File(filePath)
  }

  def subdirs(dir: File): Iterator[File] = {
    val children = dir.listFiles.filter(_.isDirectory)
    children.toIterator ++ children.toIterator.flatMap(subdirs _)
  }
}
